<template>
  <view class="detail-content">
    <!-- <ImgIcon class="content-icon-abs icon1" size="112*112" src="static/icons/play-icon-1.png" @click="toBottom"></ImgIcon> -->
    <ImgIcon size="112*112" class="content-icon-abs icon2" src="static/icons/call-icon.png"
      @click="onContactSales(detail.id)">
    </ImgIcon>
    <view class="content-box cardetail-bg">
      <view class="box-title">
        <view>{{ detail.series_name }}</view>
        <view class="one-ellipsis">{{ detail.title }}</view>
      </view>
      <view class="box-label">参考价{{ getPrice(detail.model_price) }}万</view>
      <view class="box-price">售价<text class="txt">{{ getPrice(detail.price) }}</text>万起</view>
      <view class="zhibao-box">
        <view class="box-banner">订金<text class="txt">￥{{ detail.deposit }}</text>元立即锁定爱车</view>
        <view class="box-renbao">
          <ImgIcon class="renbao-icon" size="156*42" src="static/icons/lanjie-logo.png"></ImgIcon>
          <text class="f-w">车况品质由蓝界科技承保</text>
        </view>
        <view class="box-biaoshi">
          <view class="biaoshi-item">
            <ImgIcon class="biaoshi-icon" size="88*88" src="static/icons/icon-noaccident.png"></ImgIcon>
            <view class="biaoshi-tit">非重大事故</view>
          </view>
          <view class="biaoshi-item">
            <ImgIcon class="biaoshi-icon" size="88*88" src="static/icons/icon-nofire.png"></ImgIcon>
            <view class="biaoshi-tit">非火烧</view>
          </view>
          <view class="biaoshi-item">
            <ImgIcon class="biaoshi-icon" size="88*88" src="static/icons/icon-nowater.png"></ImgIcon>
            <view class="biaoshi-tit">非泡水</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>
import ImgIcon from "@/components/ui/img-icon"
import { onContactSales } from "../../data"
function getPrice(num = 0) {
  return (num / 10000).toFixed(2) * 1
}

const { detail } = defineProps(['detail'])

function toBottom() {
  uni.pageScrollTo({
    scrollTop: 10000
  })
}
</script>


<style lang="less" scoped>
@import url(./index.less);
</style>
